/*
 * The file reads the string text in the Target Words text file
 */

package crypto;

/**
 *
 * @author Cecilia Bartley
 */

import java.io.*;
import java.util.Set;
import java.util.HashSet;

public class FileRead {

    public static Set main (String [] args){
       Set set = new HashSet();
       try{

            FileInputStream istream = new FileInputStream ("C:\\SATE\\Target Words\\Target Words.txt");

            DataInputStream in = new DataInputStream(istream);
            BufferedReader br = new BufferedReader (new InputStreamReader (in));
            String strLine;
         
            while((strLine = br.readLine()) !=null) {
               set.add(strLine);
               //System.out.println(strLine);
            }
          }
       catch (Exception e){
            System.err.println("Error: " +e.getMessage());
          }
       return set;
    }
}

        

